package com.flying.pas.form.model;

import com.flying.common.util.Codes;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Property;
import com.flying.framework.data.Data;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;

@SuppressWarnings("serial")
@Meta(id="f_form",title="表单", table="f_form", primaryKeys={"form_id"})
public class Form extends Data implements DataSerializable {
	public final static String ENTITY_NAME = "f_form";

	public final static String FORM_ID = "form_id";
	public final static String CODE = "code";
	public final static String NAME = "name";
	public final static String MODULE = "module";
	public final static String ENTITY = "entity";
	public final static String TABLE_NAME = "table_name";
	public final static String DATASOURCE = "datasource";
	public final static String PK_FIELDS = "pk_fields";
	public final static String REMARKS = "remarks";

	
	@Param(value=FORM_ID,   required=true,   maxlength=0,	desc="表单ID" , generator=Codes.AUTO_INCREMENT, 
			props= {@Property(name="type",value="hidden")})
	private Long formId;
	
	@Param(value=CODE,   required=true,   maxlength=40,	desc="代码",
			props= {@Property(name="condition",value="true")} )
	private String code;
	
	@Param(value=NAME,   required=false,   maxlength=100,	desc="名称",
			props= {@Property(name="condition",value="true")} )
	private String name;
	
	@Param(value=TABLE_NAME,   required=false,   maxlength=100,	desc="表名",
			props= {@Property(name="condition",value="true")} )
	private String tableName;
	
	@Param(value=DATASOURCE,   required=false,   maxlength=100,	desc="数据源")
	private String datasource;
	
	@Param(value=MODULE,   required=false,   maxlength=40,	desc="所属模块",
			props= {@Property(name="condition",value="true")} )
	private String module;
	
	@Param(value=ENTITY,   required=false,   maxlength=50,	desc="实体")
	private String entity;
	
	@Param(value=PK_FIELDS,   required=false,   maxlength=200,	desc="主键" )
	private String pkFields;
	
	@Param(value=REMARKS,   required=false,   maxlength=200,	desc="说明" )
	private String remarks;
	
	public String getCode() {
		return this.code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getEntity() {
		return this.entity;
	}
	
	public void setEntity(String entity) {
		this.entity = entity;
	}
	
	public Long getFormId() {
		return this.formId;
	}
	
	public void setFormId(Long formId) {
		this.formId = formId;
	}
	
	public String getModule() {
		return this.module;
	}
	
	public void setModule(String module) {
		this.module = module;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getRemarks() {
		return this.remarks;
	}
	
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getPkFields() {
		return pkFields;
	}

	public void setPkFields(String pkFields) {
		this.pkFields = pkFields;
	}

	public String getDatasource() {
		return datasource;
	}

	public void setDatasource(String datasource) {
		this.datasource = datasource;
	}
	

}